package org.springframework.samples.petclinic

/**
 * This class enables using a for loop for Iterators
 */
class ForeachIterator[A](iter:java.util.Iterator[A]) {
  def foreach(f: A => Unit): Unit = {
    while(iter.hasNext){
      f(iter.next)
    }
  }
}
